#ifndef SCRIPTEDITORWIDGET_H
#define SCRIPTEDITORWIDGET_H

#include <QtGui>
#include "scripteditor.h"
class ScriptEditorWidget : public QWidget
{
    Q_OBJECT

    QToolBar *m_toolBar;
    QTabWidget *m_docTabs;
    QVector<ScriptEditor*> m_editors;
    QCompleter *completer;

    QAction *m_newEditorAction;
    QAction *m_saveEditorAction;

    void createActions();
    QAbstractItemModel* modelFromFile(const QString& fileName);

public:
    explicit ScriptEditorWidget(QWidget *parent = 0);
    void addEditor(const QString &fileName);
signals:
    void scriptAdded(const QString &);
public slots:

    void addEditor();
    void saveCurrentEditor();
    void clean();
    void setDirtyEditor(bool value);
    void closeEditor(int index);
};

#endif // SCRIPTEDITORWIDGET_H
